package com.yang;

import java.lang.reflect.Constructor;
import java.lang.reflect.InvocationTargetException;

public class reflect01 {
    public static void main(String[] args) throws ClassNotFoundException, NoSuchMethodException, InvocationTargetException, InstantiationException, IllegalAccessException {
        Class<?> s = Class.forName("com.yang.Student");
//        Constructor<?>[] c = aClass.getConstructors();
//        for (Constructor<?> constructor : c) {
//            System.out.println(constructor);
//        }
        System.out.println("========================");

        Constructor<?> con = s.getConstructor();
        Object o = con.newInstance();
        System.out.println(o);
    }
}
